package homework3;

import java.util.Scanner;

public class Chapter04 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int h = 0;
        while (h<1) {
            System.out.println("请输入直角三角形的高度：");
            h = input.nextInt();
        }
        for(int i = 1; i<=h;i++){
            for (int j = 1;j<=h-i;j++){
                System.out.print(" ");
            }
            for (int k = 1;k<=i;k++){
                System.out.print("*");
            }
            System.out.print("\n");
        }
    }
}
